package com;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
public class HelloWorldInterceptor extends AbstractInterceptor {
    //拦截方法
	@Override
	public String intercept(ActionInvocation arg0) throws Exception {
		// 获得被调用的Action类
		Object action = arg0.getAction();
		//打印HelloWorld
		System.out.println("interceptor() is called!");
		//执行Action或调用下一个拦截器
		String result = arg0.invoke();
		//执行完action后提示
		System.out.println("Action execute() 执行完毕!");
		return result;
	}
}
